package com.biz.primus.model.sso.auth.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.io.Serializable;
import java.util.Collection;
import java.util.Set;

/**
 * Created by younger on 17/11/3.
 * 用户菜单权限查询结果VO
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UserAuthoritiesResVO implements Serializable {

    private static final long serialVersionUID = -739791647168151490L;

    /**
     * 菜单
     */
    private Collection<MenuGroupVO> menuGroups;

    private Set<GrantedAuthority> grantedAuthorities;

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }

    /**
     * {@linkplain UserAuthoritiesResVO#menuGroups}
     */
    public Collection<MenuGroupVO> getMenuGroups() {
        return menuGroups;
    }

    /**
     * {@linkplain UserAuthoritiesResVO#menuGroups}
     */
    public void setMenuGroups(Collection<MenuGroupVO> menuGroups) {
        this.menuGroups = menuGroups;
    }

    /**
     * {@linkplain UserAuthoritiesResVO#grantedAuthorities}
     */
    public Set<GrantedAuthority> getGrantedAuthorities() {
        return grantedAuthorities;
    }

    /**
     * {@linkplain UserAuthoritiesResVO#grantedAuthorities}
     */
    public void setGrantedAuthorities(Set<GrantedAuthority> grantedAuthorities) {
        this.grantedAuthorities = grantedAuthorities;
    }
}
